home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************************
- #
- # Preferences.h
- #
- # This code handles loading and saving DropEncoder's preferences into the Preferences
- # folder.
- #
- # Author: Timothy Carroll
- # Apple Developer Technical Support
- # timc@apple.com
- #
- # Revision: Jason Yeo
- #
- # Modification History:
- #
- # 2/9/97 TMC Initial Release
- #
- # 9/12/97 JY Updated for:
- # TEC 1.2.1
- # Universal Interfaces 3.0
- # CodeWarrior 11 projects
- #
- # Copyright © 1997 Apple Computer, Inc., All Rights Reserved
- #
- #
- # You may incorporate this sample code into your applications without
- # restriction, though the sample code has been provided "AS IS" and the
- # responsibility for its operation is 100% yours. However, what you are
- # not permitted to do is to redistribute the source as "DSC Sample Code"
- # after having made changes. If you're going to re-distribute the source,
- # we require that you make it clear in the source that the code was
- # descended from Apple Sample Code, but that you've made changes.
- #
- *************************************************************************************/
-
- #ifndef __PREFERENCES__
- #define __PREFERENCES__
-
- #pragma once
-
- #include "TextCommon.h"
-
- // STANDARD PREFERENCES STRUCT to be read and written to the file. The first four bytes of
- // the file are the version number, so that we can compare what's on the file with the structures
- // we understand.
-
- // Assuming we can deal with the version, we can read the rest of the file into the struct.
- // are a version number to be read in and compared. Assuming we can read this, the remainder
- // of the structure
-
- typedef struct TPreferences TPreferences;
-
- struct TPreferences
- {
- UInt32 version;
- TextEncoding outputEncoding;
- RegionCode locale;
- };
-
-
- // The App uses a global to hold the current preferences. If we can't read the file, the prefs
- // are set to a default set of preferences.
-
-
-
- OSStatus ReadPreferencesFile (TPreferences *prefs);
- OSStatus WritePreferencesFile (TPreferences *prefs);
- OSStatus SetDefaultPreferences (TPreferences *prefs);
- OSStatus EditPreferences (TPreferences *prefs);
- #endif //__PREFERENCES__